@import "../style/theme-color";

.d-radio {
  display: inline-flex;
  align-items: center;
  min-width: 252px;
  height: 36px;
  margin: 24px 0;
  font-size: 18px;
  user-select: none;
  cursor: pointer;

  &.disabled {
    opacity: .5;
    cursor: not-allowed;
  }

  .d-radio-input {
    width: 36px;
    height: 36px;
    position: relative;

    > i {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      width: 100%;
      height: 100%;

      &:after {
        opacity: 0;
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 18px;
        height: 18px;
        margin: -9px 0 0 -9px;
        background: @orange;
        border-radius: 50%;
        transform: scale(.6);
        transition: .3s cubic-bezier(.78, .14, .15, .86);
      }
    }

    > input {
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 2;
      margin: 0;
      border: 1px solid @gray;
      border-radius: 50%;
      -webkit-appearance: none;
      appearance: none;
      outline: none;
      cursor: pointer;

      &[type=radio]:checked + i:after {
        opacity: 1;
        transform: scale(1);
      }

      &[type=radio]:disabled {
        cursor: not-allowed;
      }
    }
  }

  .d-radio-text {
    padding-left: 12px;
  }
}
